package whf.framework.exception;

/**
 * @author wanghaifeng
 *
 */
public class PropertyException extends RuntimeException{
	private String propertyName;
	
	private Object target;
	
	public PropertyException(Throwable cause,Object target, String propertyName) {
		super(cause);
		this.target = target;
		this.propertyName = propertyName;
	}

	public String getMessage(){
		StringBuffer msg = new StringBuffer(super.getMessage());
		msg.append("\n\tTarget:").append(this.target);
		msg.append("\n\tProperty:").append(this.propertyName);
		return msg.toString();
	}
}
